@mixin tab() {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    background: var(--Colors-Use-Neutral-Bg-Hover);
    position: relative;
    @content;
}
@mixin tab-item() {
    padding: 12px 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    cursor: pointer;
    border-bottom: 1px solid var(--Colors-Use-Neutral-Border);
    position: relative;
    user-select: none;

    background-color: var(--Colors-Use-Neutral-Bg-Hover);
    color: var(--Colors-Use-Neutral-Text-1-Title);
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;

    &:hover {
        background-color: var(--Colors-Use-Neutral-Border);
    }

    svg {
        width: 16px;
        height: 16px;
        color: var(--Colors-Use-Neutral-Text-3-Secondary);
    }
    @content;
}

@mixin tab-item-active() {
    background-color: var(--Colors-Use-Main-Primary);
    color: var(--Colors-Use-Main-On-Primary);
    svg {
        color: var(--Colors-Use-Main-On-Primary);
    }

    &:hover {
        background-color: var(--Colors-Use-Main-Hover);

        &::after {
            background-color: var(--Colors-Use-Main-Hover);
        }
    }
    @content;
}
%divider {
    position: absolute;
    content: "";
    background-color: var(--Colors-Use-Basic-Background);
    bottom: 0;
}
.tab-wrap{
    display: flex;
    flex-direction: column;
    height: 100%;
}
.yakit-side-tab {
    @include tab() {
        height: 100%;
    }
}
.yakit-side-tab-item {
    @include tab-item() {
        .item-text {
            writing-mode: vertical-rl;
            text-orientation: sideways-right;
            transform: rotate(180deg);
        }
        &::after {
            @extend %divider;
            width: 100%;
            height: 1px;
            right: 0;
        }
    }
}

.yakit-side-tab-item-active {
    @include tab-item-active();
}
.yakit-side-tab-item-show {
    background-color: var(--Colors-Use-Main-Border);
    border-bottom-color: var(--Colors-Use-Main-Border);
    &.yakit-side-tab-item-active::before {
        background-color: var(--Colors-Use-Main-Border);
    }
    &.yakit-side-tab-item-active::after {
        background-color: var(--Colors-Use-Main-Border);
    }
}
.yakit-side-tab-item-show:hover {
    background-color: var(--Colors-Use-Main-Hover);
    border-bottom-color: var(--Colors-Use-Main-Hover);
    &.yakit-side-tab-item-active::before {
        background-color: var(--Colors-Use-Main-Hover);
    }
    &.yakit-side-tab-item-active::after {
        background-color: var(--Colors-Use-Main-Hover);
    }
}

.yakit-side-tab-horizontal {
    @include tab() {
        flex-direction: row;
        width: 100%;
        height: 24px;
        &::after {
            position: absolute;
            content: "";
            width: 100%;
            height: 1px;
            bottom: 0;
            background-color: var(--Colors-Use-Neutral-Border);
        }
    }
}
.yakit-side-tab-horizontal-item {
    @include tab-item() {
        padding: 4px 8px;
        flex-direction: row;
        height: 24px;
        &::after {
            @extend %divider;
            width: 1px;
            height: 100%;
            right: 0;
        }
    }
}

.yakit-side-tab-horizontal-item-active {
    @include tab-item-active();
}
